package com.Travit;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.ImageButton;

public class Vendor extends Activity{
	
	ImageButton requestser;
	ImageButton trackser;
	ImageButton logoutbutton;
	String loggedid;
	
	public void onCreate(Bundle savedInstanceState){
		super.onCreate(savedInstanceState);
		Bundle extras = getIntent().getExtras();
		loggedid = extras.getString("loggedid");
		setContentView(R.layout.vendorhome);
		requestser = (ImageButton) findViewById(R.id.requestservice);
		trackser = (ImageButton) findViewById(R.id.servicetrack);
		logoutbutton = (ImageButton) findViewById(R.id.logout);
		
		logoutbutton.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Intent newIntent = new Intent(v.getContext(), TravITActivity.class);
				newIntent.putExtra("venid", loggedid);
				startActivity(newIntent);
			}
		
			
		});

		requestser.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Intent newIntent = new Intent(v.getContext(), VendorNewService.class);
				newIntent.putExtra("venid", loggedid);
				startActivity(newIntent);
			}
		});
		trackser.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Intent newIntent = new Intent(v.getContext(), VendorTrackService.class);
				newIntent.putExtra("venid", loggedid);
				startActivity(newIntent);
			}
		});
	}
}